package com.ifast.oldNews.service;

import java.io.IOException;
import java.util.List;

import javax.servlet.http.HttpServletRequest;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;
import com.ifast.news.domain.News;
import com.ifast.news.domain.NewsCollect;
import com.luculent.util.extension.api.PageResult;
import com.luculent.util.extension.api.Result;

/**
 *@Description: 新闻
 *@Author: ShiQiang
 *@Since: 2019年1月5日上午10:44:23
 */
public interface OldNewsService extends IService<News>{ 
	
	/**新闻类别*/
	public Result<?> classify(String userId);
	public Result<?> newsHelp(String userId);
	public Result<?> newsAboutOurs(String userId);
	/**收藏列表*/
	PageResult<?> pageCollectList(String userId,String topDeptId,String nian,String yue,String ri,Page<NewsCollect> page);
	
	/**列表*/
	PageResult<?> pageList(String userId,String topDeptId,String title,String classify,String nian,String yue,String ri,Page<News> page);
	
	/**列表*/
	PageResult<?> pageHelpList(String userId,String topDeptId,String title,String classify,String nian,String yue,String ri,Page<News> page);
	
	/**详情*/
	public Result<?> info(String userId,String newsId); 
	/**收藏*/
	public Result<?> collect(String userId,String newsId);
	/**缺陷收藏*/
	public Result<?> unCollect(String userId,String newsId);
	/**点赞*/
	public Result<?> click(String userId,String newsId); 
	/**取消点赞*/
	public Result<?> unClick(String userId,String newsId); 
	
	/**新增*/
	public Result<?> add(HttpServletRequest request,String userId,String topDeptId,News news)throws IOException;
	/**删除*/
	public Result<?> remove(String id);
	/**批量删除*/
	public Result<?> batchRemove(List<String> ids);
	
	public com.ifast.common.utils.Result<?> transCode(String id);
}
